const proxy = require('http-proxy-middleware')

module.exports = function (app) {
    app.use(
        '/api',
        proxy.createProxyMiddleware({
            target: 'https://modex.51vip.biz/api', //请求转发地址
            changeOrigin: true,//控制服务器收到的响应头中host字段的值
            pathRewrite: {
                '^/api': ''
            }
        })
    );
}
